package old.builder.demo2;

public class Worker extends Builder {
    private Product product;

    Worker(){
        product = new Product();
    }

    @Override
    Builder builderA(String name) {
        product.setMa(name);
        System.out.println("builderA");
        return this;
    }

    @Override
    Builder builderB(String name) {
        product.setMb(name);
        System.out.println("builderB");
        return this;
    }

    @Override
    Builder builderC(String name) {
        product.setMc(name);
        System.out.println("builderC");
        return this;
    }

    @Override
    Builder builderD(String name) {
        product.setMd(name);
        System.out.println("builderD");
        return this;
    }

    @Override
    Product getBuild() {
        return product;
    }
}
